// link event
process.on('exit', function() {
  console.log('안녕히 가거라^_^ ..!');
});

// link event
process.on('uncaughtException', function(error) {
  console.log('예외가 발생했군 ^_^ 봐주겠다 ^_^ ..!');
});

// generate error three times every 2 secs
var count = 0;
var id = setInterval(function() {
  // increase count
  count++;
  
  // if error occurs three times, stop timer
  if (count == 3) {clearInterval(id);}
  
  // generate error forcely
  error.error.error();
}, 2000);